package com.quick.service;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.retry.annotation.EnableRetry;

/**
 * 功能描述 TODO
 *
 * @Created Time 2017/9/13
 * @Edited Time 2017/9/13
 * @Created by wangxin43
 */
@Configuration
@EnableRetry
@EnableAspectJAutoProxy(proxyTargetClass=true)
public class TestService {
    @Bean
    public RetryService retryService(){
        return new RetryService();
    }
    public static void main(String[] args) throws Exception{
        final AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(TestService.class);
        final RetryService retryService = applicationContext.getBean(RetryService.class);
        retryService.retryTest();
    }
}
